package com.ny.dto;

import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.PositiveOrZero;
import javax.validation.constraints.Size;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import io.swagger.annotations.ApiModelProperty;

/**
 * 会员信息
 *
 * @author MSI-NB
 * @date 2025-03-08 13:14:38
 */
@Data
public class MemberDTO {

    /**
     * 会员ID:会员ID
     */
    @NotNull(groups = { UpdateGroup.class, DeleteGroup.class }, message = "会员ID不能为空")
    @ApiModelProperty(value = "会员ID:会员ID")
    private Integer memberId;

    /**
     * 会员姓名:会员姓名
     */
    @NotBlank(groups = { CreateGroup.class, UpdateGroup.class }, message = "会员姓名不能为空")
    @Size(max = 100, message = "会员姓名长度不能超过100")
    @ApiModelProperty(value = "会员姓名:会员姓名")
    private String name;

    /**
     * 会员联系方式:会员联系方式
     */
    @NotBlank(groups = { CreateGroup.class, UpdateGroup.class }, message = "会员联系方式不能为空")
    @Size(max = 150, message = "会员联系方式长度不能超过150")
    @ApiModelProperty(value = "会员联系方式:会员联系方式")
    private String contactInfo;

    /**
     * 加入日期:加入日期
     */
    @NotNull(groups = { CreateGroup.class, UpdateGroup.class }, message = "加入日期不能为空")
    @ApiModelProperty(value = "加入日期:加入日期")
    private Date joinDate;

    /**
     * 会员等级ID:会员等级ID
     */
    @PositiveOrZero(groups = { CreateGroup.class, UpdateGroup.class }, message = "会员等级ID不能为负数")
    @ApiModelProperty(value = "会员等级ID:会员等级ID")
    private Integer levelId;
}
